<style scoped>
  .expand-row{
    margin-bottom: 16px;
  }
  .lyx-table-btn{
    margin-right: 5px;
    margin-bottom: 2px;
  }
  .title-size {
    font-weight: bold;
    font-size: 1rem;
  }
</style>
<template>
  <div>
      <Form label-position="right" :label-width="100" style="position: relative;" :model="formDate">
      <Row class="mb20">
        <Col span="13" class="ivu-form-item-label title-size">登记终止申请</Col>
      </Row>
      <Row class="mb20">
        <Col span="8" class="ivu-form-item-label">终止原因：</Col>
        <Col span="9" offset="1" class="ivu-form-item-content">
          <Select v-model="formDate.overReasonFlag" style="width:363px">
            <Option v-for="item in formDate.overReasonFlagList" :value="parseInt(item.overReasonFlagName)" :key="item.overReasonFlagName">{{ item.overReasonFlagCode }}</Option>
          </Select>
        </Col>
      </Row>
      <Row class="mb20">
        <Col span="8" class="ivu-form-item-label">终止原因说明：</Col>
        <Col span="9" offset="1" class="ivu-form-item-content">
          <Input v-model="formDate.overReasonMemo" type="textarea" :rows="4"/>
        </Col>
      </Row>
      <Row class="mb20">
        <Col span="8" class="ivu-form-item-label">终止发放月份：</Col>
        <Col span="9" offset="1" class="ivu-form-item-content">
          <Select v-model="formDate.stopMonth" style="width:363px">
            <Option v-for="item in monthListaa" :value="item" :key="item">{{ item }}</Option>
          </Select>
        </Col>
      </Row>
      <Row class="mb20">
        <Col span="8" class="ivu-form-item-label">社区终止操作人：</Col>
        <Col span="9" offset="1" class="ivu-form-item-content">
          <Input v-model="formDate.stopActionPerson" ></Input>
        </Col>
      </Row>
        <Row class="mb20">
          <Col span="8" class="ivu-form-item-label">社区负责人：</Col>
          <Col span="9" offset="1">
            <Input v-model="formDate.committeePrincipal"></Input>
          </Col>
        </Row>
        <Row class="mb20">
          <Col span="8" class="ivu-form-item-label">受理时间：</Col>
          <Col span="9" offset="1" class="ivu-form-item-content">
            <DatePicker type="date" style="width: 363px" v-model="formDate.acceptDate"></DatePicker>
          </Col>
        </Row>
      <Row class="mb20">
        <Col span="13" class="ivu-form-item-label">
          <Button @click="save()">提交</Button>
        </Col>
      </Row>
    </Form>
  </div>
</template>
<script>
// import { itemParamByOrderList } from '@/api/eventlist'
import { date2str } from '@/api/eventlist'
export default {
  name: 'Form12',
  data () {
    return {
      bwk: '0',
      paramsArr: [],
      list: [],
      stopMonthList: []
    }
  },
  props: {
    formDate: Object,
    tempData: Object,
    ruleData: Object,
    monthListaa: {
      type: Array,
      default: () => {
        return []
      }
    }
  },
  mounted () {
  },
  watch: {

  },
  methods: {
    /* datechange (data) {
      this.formDate.zhongzhi = data
    }, */
    save () {
      this.formDate.acceptDate = date2str(this.formDate.acceptDate)
      console.log(this.ruleData, '规则数据')
      if (this.formDate.overReasonFlag === undefined || this.formDate.overReasonFlag === null) {
        this.$Notice.error({ title: '请填写终止原因', desc: '' })
      } else if (!this.formDate.overReasonMemo) {
        this.$Notice.error({ title: '请填写终止原因说明', desc: '' })
        return false
      /* } else if (!this.formDate.stopMonth) {
        this.$Notice.error({ title: '请选择终止发放月份', desc: '' })
        return false */
      } else if (!this.formDate.stopActionPerson) {
        this.$Notice.error({ title: '请填写社区变更操作人', desc: '' })
        return false
      } else if (!this.formDate.committeePrincipal) {
        this.$Notice.error({ title: '请填写社区负责人', desc: '' })
      } else {
        console.log(this.formDate)
        // 隐藏对话框
        this.$emit('ee')
      }
    }

  }
}
</script>
